<template>
  <el-dialog
    :modal="true"
    title="添加图表模块"
    :visible.sync="dialogVisibleProps"
    width="30%"
    :before-close="handleClose"
  >
    <el-button type="primary" @click="addChart">添加一个散点图</el-button> 
    <span slot="footer" class="dialog-footer">
      <el-button @click="no">取 消</el-button>
      <el-button type="primary" @click="yes">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
    name:"dialogtext",
    props:{
        dialogVisibleProps:Boolean,
    },
    methods:{
         // 对话框
        handleClose(done) {
          this.$emit('update:dialogVisibleProps', false);
        },
        no(){         
          this.$emit('update:dialogVisibleProps', false);
        },
        yes(){
          this.$emit('update:dialogVisibleProps', false);
        },
        addChart(){
          this.$emit("addChart");
        }
    },        
};
</script>

<style>
</style>